-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(s2n-quic-events): Adds events for s2n-quic-dc #2321
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good - just a few small changes
#[doc = r" &mut self,"] | ||
#[doc = r" context: &mut Self::ConnectionContext,"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm looks like we'll need to modify this example as well. But we can have that as a follow-up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh yeah, wasn't sure what we wanted to do with the docs. That will be a follow up.
#[doc = r""] | ||
#[doc = r" ```no_run"] | ||
#[doc = r" # mod s2n_quic { pub mod provider { pub mod event {"] | ||
#[doc = r" # pub use s2n_quic_core::event::{api as events, api::ConnectionInfo, api::ConnectionMeta, Subscriber};"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. We need to reference the correct crate.
Resolved issues:
N/A
Description of changes:
This PR includes changes to generate events for both s2n-quic and s2n-quic-dc. The biggest difference is that s2n-quic-dc will be passing around a single, shared Subscriber, which means that we need to produce events that take an immutable reference to the Subscriber, rather than a mutable reference. This has some cascading effects that you can see in this PR.
Call-outs:
I basically tokenized everything, not sure if this is how we want this to look. My goal was to make sure the original generated.rs didn't change at all with this change.
Testing:
Compiles. I included an example event in the dc folder to show what is produced from the change.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.